import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;




public class SuperMarioBros {
    //初始窗体，开始界面
    GameScene gameScene=new GameScene();
    public static final double Width=1024,Height=600;
    public void MarioBros(Stage stage){
        stage.setWidth(Width);
        stage.setHeight(Height);
        AnchorPane root=new AnchorPane();
        ImageView imageView=new ImageView(new Image("mari1.png"));
        imageView.setY(400);
        imageView.setX(260);
        imageView.setFitHeight(60);
        imageView.setFitWidth(60);
        ImageView imageView1=new ImageView(new Image("bj.png"));
        imageView1.setY(0);
        imageView1.setX(0);
        imageView1.setFitHeight(600);
        imageView1.setFitWidth(1024);
        ImageView imageView2=new ImageView(new Image("kaishi.png"));
        imageView2.setY(300);
        imageView2.setX(360);
        imageView2.setFitHeight(50);
        imageView2.setFitWidth(200);
        imageView2.setOnMouseClicked(new EventHandler<MouseEvent>() {
            @Override
            public void handle(MouseEvent event) {
                gameScene.ini(stage);
            }
        });
        root.getChildren().addAll(imageView1,imageView,imageView2);
        Scene scene=new Scene(root);
        stage.setScene(scene);
        stage.show();


    }


}
